<?php 
/**
 * ... ...
 * ... ...
 *
 */ 


JCAT_Package::ImportClass('JCAT_GtkDialog',JCAT::PACKAGE_MVCGTK) ;
JCAT_Package::ImportInterface('JCAT_IViewForm',JCAT::PACKAGE_MVC) ;


/**
 * 视图类 DBConnectDlg 
 *
 * @access public
 */
class DBConnectDlg 
	//<<[UnmodifiableBlock.Start]::Extends And Implements::>>//
	extends JCAT_GtkDialog
	implements JCAT_IViewForm
	//<<[UnmodifiableBlock.End]::Extends And Implements::>>// 
{
	
	/**
	 * 构造函数 
	 *
	 * @access	public
	 * @param	$aParent	JCAT_IViewContainer		视图的父对象(父视图 或 控制器)。注意：视图不应单独存在，必须有一个父对象！ 
	 * @return	void
	 */
	public function DBConnectDlg(JCAT_IViewContainer $aParent)
	{
		// 调用父类构造函数 
		//<<[UnmodifiableBlock.Start]::Call Parent Construct::>>//
		$this->JCAT_GtkDialog('DBConnectDlg','template.DBConnectDlg.glade','DBConnectDlg',$aParent) ;
		//<<[UnmodifiableBlock.End]::Call Parent Construct::>>// 

		$this->Initialize() ;	
	}
	
	/**
	 * 初始化 视图 
	 *
	 * @access	protected
	 * @return	void
	 */
	protected function Initialize()
	{
		//<<[UnmodifiableBlock.Start]::UICtrl Children::>>//
		// 载入UI控件
		$sCurrentDirectory = dirname(__FILE__).'/' ;
		$this->AddUICtrl(JCAT_Package::ImportInstance($sCurrentDirectory.'Instance.UICtrls/instance.DBFactory.php'),'') ;
		$this->AddUICtrl(JCAT_Package::ImportInstance($sCurrentDirectory.'Instance.UICtrls/instance.DBServer.php'),'') ;
		$this->AddUICtrl(JCAT_Package::ImportInstance($sCurrentDirectory.'Instance.UICtrls/instance.DBUser.php'),'') ;
		$this->AddUICtrl(JCAT_Package::ImportInstance($sCurrentDirectory.'Instance.UICtrls/instance.DBPassword.php'),'') ;
		$this->AddUICtrl(JCAT_Package::ImportInstance($sCurrentDirectory.'Instance.UICtrls/instance.DBName.php'),'') ;
		//<<[UnmodifiableBlock.End]::UICtrl Children::>>// 
		
		//<<[UnmodifiableBlock.Start]::View Children::>>//

		//<<[UnmodifiableBlock.End]::View Children::>>// 
		
		
		// 在此加入其它初始化代码 
	 	// TODO ... ...

	}
	
	/**
	 * 创建主窗体事件 
	 *
	 * @access	protected
	 * @return	void
	 */
	 protected function OnInitView()
	 {
	 	// TODO
	 	// ... ...
	 }

	
	/**
	 * what's this
	 * 
	 * @access	public
	 * @return	void
	 */
	public function OnOk()
	{
		$aController = $this->GetParentController() ;
		JCAT_ASSERT::ASSERT_INSTANCE($aController,'DBConnect') ;
		
		// 尝试连接
		if( !$aController->IsConnected() )
		{
			$aController->OnConnect() ;
		}

		// 检查是否可用
		if( $aController->IsConnected() )
		{
			parent::OnOk() ;
		}
		
		else 
		{
			JCAT_Gtk::MsgDlg(JCAT_Language::Sentence('尚无可用连接。')) ;
		}
	}

}

?><?
/**
 * [注意!!]
 *	以下内容由 JCAT PHP Toolbox 自动维护，手动更改的内容会被 JCAT PHP Toolbox 抹除，
 *	同时还可能破坏格式，导致 JCAT PHP Toolbox 无法正常读取。
 */
/*<<[UnmodifiableBlock.Start]::Coder Dialog Data::>>&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&//
<<{{DocumentClass:ViewGtkDoc}}>>
eCVEQSU4RFQlREIlOEUlREFIJTEwJTdEX2klM0YlMjIlN0MlNDAlMDBjNiVDNCU4OSUyMiVFMSUxQiVCMSU5NSVCNiVBN00lQjdnJUZEJUI0ckwlMkYlMTg3eCUwNE4lQzAlMUUlRjElRUYlN0IlQ0ElMEMlQjMlMTNlJUIyJURBJTg3ViVERiVBQSVBQk4lOURTJUQ1JUI5ZVglOEZHJUNCJUI0JTA2biVERSVFNCU4MyUw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